home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / IDLIncludes / Controls.idl < prev    next >
Text File  |  1996-05-01  |  13KB  |  306 lines

  1. /*
  2.      File:        Controls.idl
  3.  
  4.      Contains:    Control Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __CONTROLS_IDL__
  19. #define __CONTROLS_IDL__
  20.  
  21. #include <somobj.idl>
  22. #include <somcls.idl>
  23.  
  24. #ifndef __TYPES_IDL__
  25. #include <Types.idl>
  26. #endif
  27. #ifndef __QUICKDRAW_IDL__
  28. #include <Quickdraw.idl>
  29. #endif
  30. #ifndef __MENUS_IDL__
  31. #include <Menus.idl>
  32. #endif
  33.  
  34. #ifdef __SOMIDL__
  35.  
  36. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  37. /*
  38. _________________________________________________________________________________________________________
  39.  * CONTROL DEFINITION ID'S
  40. _________________________________________________________________________________________________________
  41.  Standard System 7 procID's
  42. */
  43. /*
  44. _________________________________________________________________________________________________________
  45.  * VARIANT CODES
  46. _________________________________________________________________________________________________________
  47. */
  48. typedef SInt16                    ControlVariant;
  49.  
  50. /*
  51. _________________________________________________________________________________________________________
  52.  * CONTROL PART CODES
  53. _________________________________________________________________________________________________________
  54. */
  55. typedef SInt16                    ControlPartCode;
  56.  
  57. /*
  58. _________________________________________________________________________________________________________
  59.  * CHECK BOX VALUES
  60. _________________________________________________________________________________________________________
  61. */
  62. /*
  63. _________________________________________________________________________________________________________
  64.  * RADIO BUTTON VALUES
  65. _________________________________________________________________________________________________________
  66. */
  67. /*
  68. _________________________________________________________________________________________________________
  69.  
  70.  * CONTROL POP-UP MENU CONSTANTS
  71. _________________________________________________________________________________________________________
  72.  Variant codes for the System 7 pop-up menu
  73. */
  74. /* Menu label styles for the System 7 pop-up menu */
  75. /* Menu label justifications for the System 7 pop-up menu*/
  76. /*
  77. _________________________________________________________________________________________________________
  78.  * CONTROL DRAGGRAYRGN CONSTANTS
  79.    For DragGrayRgnUPP used in TrackControl() 
  80. _________________________________________________________________________________________________________
  81. */
  82. /*
  83. _________________________________________________________________________________________________________
  84.  * CONTROL COLOR TABLE PART CODES
  85. _________________________________________________________________________________________________________
  86. */
  87. /*
  88. _________________________________________________________________________________________________________
  89.  * CONTROLHANDLE & CONTROLREF
  90. _________________________________________________________________________________________________________
  91. */
  92.  
  93.  
  94. typedef OpaquePtr                ControlPtr;                    /* Substituted OpaquePtr for ``ControlRecord*'' */
  95.  
  96. typedef OpaquePtr                ControlHandle;                /* Substituted OpaquePtr for ``ControlPtr*'' */
  97.  
  98. typedef ControlHandle            ControlRef;
  99.  
  100. /*
  101. _________________________________________________________________________________________________________
  102.  * CONTROL ACTIONPROC POINTER
  103. _________________________________________________________________________________________________________
  104. */
  105. typedef OpaquePtr ControlActionProcPtr;
  106. typedef OpaquePtr ControlActionUPP;
  107. /*
  108. _________________________________________________________________________________________________________
  109.  * CONTROL COLOR TABLE
  110. _________________________________________________________________________________________________________
  111. */
  112. typedef SOMLargeStruct            CtlCTab;                    /* Derived from a struct of 40 bytes in size */
  113.  
  114. typedef OpaquePtr                CCTabPtr;                    /* Substituted OpaquePtr for ``CtlCTab*'' */
  115.  
  116. typedef OpaquePtr                CCTabHandle;                /* Substituted OpaquePtr for ``CCTabPtr*'' */
  117.  
  118. /*
  119. _________________________________________________________________________________________________________
  120.  * CONTROL RECORD
  121. _________________________________________________________________________________________________________
  122. */
  123. typedef SOMLargeStruct            ControlRecord;                /* Derived from a struct of 296 bytes in size */
  124.  
  125. /*
  126. _________________________________________________________________________________________________________
  127.  * AUXILLARY CONTROL RECORD STRUCTURE
  128. _________________________________________________________________________________________________________
  129. */
  130. typedef SOMLargeStruct            AuxCtlRec;                    /* Derived from a struct of 22 bytes in size */
  131.  
  132. typedef OpaquePtr                AuxCtlPtr;                    /* Substituted OpaquePtr for ``AuxCtlRec*'' */
  133.  
  134. typedef OpaquePtr                AuxCtlHandle;                /* Substituted OpaquePtr for ``AuxCtlPtr*'' */
  135.  
  136. /*
  137. _________________________________________________________________________________________________________
  138.  * POP-UP MENU PRIVATE DATA STRUCTURE
  139. _________________________________________________________________________________________________________
  140. */
  141. typedef SOMLargeStruct            PopupPrivateData;            /* Derived from a struct of 6 bytes in size */
  142.  
  143. typedef OpaquePtr                PopupPrivateDataPtr;        /* Substituted OpaquePtr for ``PopupPrivateData*'' */
  144.  
  145. typedef OpaquePtr                PopupPrivateDataHandle;        /* Substituted OpaquePtr for ``PopupPrivateDataPtr*'' */
  146.  
  147. /*
  148. _________________________________________________________________________________________________________
  149.  * CONTROL ACTION PROC UPP'S
  150. _________________________________________________________________________________________________________
  151. */
  152. /*
  153. _________________________________________________________________________________________________________
  154.     
  155.  * CONTROL CREATION / DELETION API'S
  156. _________________________________________________________________________________________________________
  157. */
  158. /*
  159. _________________________________________________________________________________________________________
  160.     
  161.  * CONTROL SHOWING/HIDING API'S
  162. _________________________________________________________________________________________________________
  163. */
  164. /*
  165. _________________________________________________________________________________________________________
  166.     
  167.  * CONTROL DRAWING API'S
  168. _________________________________________________________________________________________________________
  169. */
  170. /*
  171. _________________________________________________________________________________________________________
  172.     
  173.  * CONTROL HIGHLIGHT API'S
  174. _________________________________________________________________________________________________________
  175. */
  176. /*
  177. _________________________________________________________________________________________________________
  178.     
  179.  * CONTROL TRACKING/DRAGGING API'S
  180. _________________________________________________________________________________________________________
  181.     When using the TrackControl() call when tracking an indicator, the actionProc parameter (type ControlActionUPP) 
  182.   should be replaced by a parameter of type DragGrayRgnUPP (see Quickdraw.h).
  183. */
  184. /*
  185. _________________________________________________________________________________________________________
  186.     
  187.  * CONTROL MOVING/SIZING API'S
  188. _________________________________________________________________________________________________________
  189. */
  190. /*
  191. _________________________________________________________________________________________________________
  192.     
  193.  * CONTROL TITLE API'S
  194. _________________________________________________________________________________________________________
  195. */
  196. /*
  197. _________________________________________________________________________________________________________
  198.     
  199.  * CONTROL VALUE, MIMIMUM, AND MAXIMUM API'S
  200. _________________________________________________________________________________________________________
  201. */
  202. /*
  203. _________________________________________________________________________________________________________
  204.     
  205.  * CONTROL VARIANT AND WINDOW INFORMATION API'S
  206. _________________________________________________________________________________________________________
  207. */
  208. /*
  209. _________________________________________________________________________________________________________
  210.     
  211.  * CONTROL ACTION PROC API'S
  212. _________________________________________________________________________________________________________
  213. */
  214. /*
  215. _________________________________________________________________________________________________________
  216.     
  217.  * CONTROL ACCESSOR API'S
  218. _________________________________________________________________________________________________________
  219. */
  220. /*
  221. _________________________________________________________________________________________________________
  222.     
  223.  * VALID 'CDEF' MESSAGES
  224. _________________________________________________________________________________________________________
  225. */
  226. typedef SInt16                    ControlDefProcMessage;
  227.  
  228. /*
  229. _________________________________________________________________________________________________________
  230.     
  231.  * MAIN ENTRY POINT FOR 'CDEF'
  232. _________________________________________________________________________________________________________
  233. */
  234. typedef OpaquePtr ControlDefProcPtr;
  235. typedef OpaquePtr ControlDefUPP;
  236. /*
  237. _________________________________________________________________________________________________________
  238.     
  239.  * CONSTANTS FOR DRAWCNTL MESSAGE PASSED IN PARAM
  240. _________________________________________________________________________________________________________
  241. */
  242. /*
  243. _________________________________________________________________________________________________________
  244.     
  245.  * CONSTANTS FOR DRAGCNTL MESSAGE PASSED IN PARAM
  246. _________________________________________________________________________________________________________
  247. */
  248. /*
  249. _________________________________________________________________________________________________________
  250.     
  251.  * DRAG CONSTRAINT STRUCTURE PASSED IN PARAM FOR THUMBCNTL MESSAGE (IM I-332)
  252. _________________________________________________________________________________________________________
  253. */
  254. typedef SOMLargeStruct            IndicatorDragConstraint;    /* Derived from a struct of 18 bytes in size */
  255.  
  256. typedef OpaquePtr                IndicatorDragConstraintPtr;    /* Substituted OpaquePtr for ``IndicatorDragConstraint*'' */
  257.  
  258. typedef OpaquePtr                IndicatorDragConstraintHandle; /* Substituted OpaquePtr for ``IndicatorDragConstraintPtr*'' */
  259.  
  260. /*
  261. _________________________________________________________________________________________________________
  262.  * C GLUE
  263. _________________________________________________________________________________________________________
  264. */
  265. #if OLDROUTINENAMES
  266. /*
  267. _________________________________________________________________________________________________________
  268.  * OLDROUTINENAMES
  269. _________________________________________________________________________________________________________
  270.  Variants applicable to all controls (at least ones with text)
  271. */
  272. #endif
  273. /*
  274. *****************************************************************************
  275. *                                                                           *
  276. * The conditional STRICT_CONTROLS has been removed from this interface file.*
  277. * The accessor macros to a ControlRecord are no longer necessary.           *
  278. *                                                                           *
  279. *****************************************************************************
  280.  
  281. Details:
  282. The original purpose of the STRICT_ conditionals and accessor macros was to
  283. help ease the transition to Copland.   Shared data structures are difficult
  284. to coordinate in a preemptive multitasking OS.  By hiding the fields in a
  285. WindowRecord and other data structures, we would begin the migration to 
  286. system data structures being completely hidden from applications. 
  287.  
  288. After many design reviews, it was finally concluded that with this sort of
  289. migration, the system could never tell when an application was no longer 
  290. peeking at a WindowRecord, and thus the data structure might never become 
  291. system owned.  Additionally, there were many other limitations in the classic
  292. toolbox that were begging to be addressed.
  293.  
  294. The final decision was to leave the traditional toolbox as a compatibility mode.
  295. The preferred toolbox API for Copland is a new SOM(tm) based architecture 
  296. (e.g. HIWindows.idl).  Windows, menu, controls, etc are each a SOM object 
  297. with methods for drawing, event handling, and customization.
  298.  
  299. */
  300. #endif
  301.  
  302. #endif /* __SOMIDL__ */
  303.  
  304. #endif /* __CONTROLS_IDL__ */
  305.  
  306.